home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
math
/
nrpas13
/
qtrap.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-29
|
359b
|
18 lines
PROCEDURE qtrap(a,b: real;VAR s: real);
LABEL 99;
CONST
eps=1.0e-6;
jmax=20;
VAR
j: integer;
olds: real;
BEGIN
olds := -1.0e30;
FOR j := 1 TO jmax DO BEGIN
trapzd(a,b,s,j);
IF (abs(s-olds) < eps*abs(olds)) THEN GOTO 99;
olds := s
END;
writeln ('pause in QTRAP - too many steps'); readln;
99: END;